home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 50
/
Volume 50 - JOGO DISK .iso
/
Games
/
marionettemadness.swf
/
scripts
/
__Packages
/
XML2.as
< prev
next >
Wrap
Text File
|
2007-10-01
|
1KB
|
47 lines
class XML2 extends XML
{
var timeout = 7000;
function XML2(p_xml)
{
super(p_xml);
this.ignoreWhite = true;
this.contentType = "text/xml";
mx.events.EventDispatcher.initialize(this);
}
function load(p_url)
{
this.setTimeout();
super.load(p_url,"POST");
}
function sendAndLoad(p_url, p_targetXML)
{
this.setTimeout();
super.sendAndLoad(p_url,p_targetXML,"POST");
}
function setTimeout()
{
this.clearTimeout();
this.tmp_timeoutID = setInterval(this,"onTimeout",this.timeout);
}
function clearTimeout()
{
clearInterval(this.tmp_timeoutID);
delete this.tmp_timeoutID;
}
function onLoad(p_success)
{
if(!this.tmp_timeoutID)
{
return undefined;
}
this.clearTimeout();
this.dispatchEvent({target:this,type:"load",success:p_success});
}
function onTimeout()
{
this.clearTimeout();
this.status = -100;
this.dispatchEvent({target:this,type:"load",success:false});
}
}